'use strict';

module.exports = app => {
    const { Sequelize, model } = app

    const Model = model.define('captcha', {
        id:{
            type: Sequelize.STRING.BINARY,
            defaultValue: Sequelize.UUIDV1,
            primaryKey: true
        },
        mobile: {
            type: Sequelize.STRING(20),
        },
        code: {
            type: Sequelize.STRING(10),
        },
    }, {
        freezeTableName: true,
        tableName: 'tmp_captcha',
    })

    return Model
}